package com.woniu.his.bms.app.consumer;

import com.woniu.his.bms.service.BillsRecordService;
import org.apache.rocketmq.spring.annotation.RocketMQMessageListener;
import org.apache.rocketmq.spring.core.RocketMQListener;
import org.springframework.stereotype.Component;

import javax.annotation.Resource;

/**
 * @version: java version 1.8
 * @Author: ZJH
 * @description:
 * @date: 2022-12-04 20:33
 */
@Component
@RocketMQMessageListener(topic = "bill-pay-success",consumerGroup = "pay")
public class BillPaySuccessConsumer implements RocketMQListener<String> {

    @Resource
    private BillsRecordService billsRecordService;

    @Override
    public void onMessage(String s) {
        billsRecordService.paySuccess(s);
    }
}
